
from pydantic import BaseConfig


class GlobalConfig(BaseConfig):
    HOST: str = 'ser.loserbai.cn:40036'
    DATABASE = 'demo-im'
    DRIVER: str = ''
    DATABASE_URL = f"mysql+pymysql://demo-im:demo-im@{HOST}/{DATABASE}"

    ASYNC_DATABASE_URL = f"mysql+asyncmy://demo-im:demo-im@{HOST}/{DATABASE}"

    # 配置 JWT
    SECRET_KEY = "demo-im"
    ALGORITHM = "HS256"
    ACCESS_TOKEN_EXPIRE_MINUTES = 30

    SERVER_HOST = 'http://localhost:8000'

    #file
    SAVE_FILE_PATH = 'static'



config = GlobalConfig()
